
<!DOCTYPE html>
<html lang="en">

<head>
	<meta name="force-rendering" content="webkit">
	<meta charset="utf-8" />
	<title><?php echo $title ?></title>
	<meta name="description" content="overview &amp; stats" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link href="../public/css/bootstrap.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="../public/css/font-awesome.min.css" />
	<link rel="stylesheet" href="../public/css/ace.min.css" />
	<link rel="stylesheet" href="../public/css/ace-rtl.min.css" />
	<link rel="stylesheet" href="../public/css/ace-skins.min.css" />
	<link rel="stylesheet" href="../public/css/common/public.css" />
	<link rel="stylesheet" href="../public/css/shopbranditem/shopbranditem.css" />
	<script src="../public/js/ace-extra.min.js"></script>
  <!--[if IE 7]>
  <link rel="stylesheet" href="../public/css/font-awesome-ie7.min.css" />
  <![endif]-->
  <!--[if lte IE 8]>
  <link rel="stylesheet" href="../public/css/ace-ie.min.css" />
  <![endif]-->
  <!--[if lt IE 9]>
  <script src="../public/js/html5shiv.js"></script>
  <script src="../public/js/respond.min.js"></script>
  <![endif]-->
	<script src="../public/js/jquery-1.10.2.min.js"></script>
	<script src="../public/js/common/dialog.js"></script>
	<script type="text/javascript" src="../public/js/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
	<div class="navbar navbar-default" id="navbar">
		<script type="text/javascript">
			try {
				ace.settings.check('navbar', 'fixed')
			} catch (e) {}
		</script>

		<div class="navbar-container" id="navbar-container">
			<div class="navbar-header pull-left">
				<a href="#" class="navbar-brand">
					<small>
							<i class="icon-leaf"></i>
							CRM
						</small>
				</a>
				<!-- /.brand -->
			</div>
			<!-- /.navbar-header -->

			<div class="navbar-header pull-right" role="navigation">
				<ul class="nav ace-nav">
					<li class="light-blue">
						<a data-toggle="dropdown" href="#" class="dropdown-toggle">
							<img class="nav-user-photo" src="../public/avatars/user.jpg" alt="Jason's Photo" />
							<span class="user-info">
									<small>欢迎,</small>
									<?php echo $this->session->userdata('username'); ?>
								</span>

							<i class="icon-caret-down"></i>
						</a>

						<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
							<li>
								<a href="javascript:;" id="udpwd">
									<i class="icon-cog"></i> 修改密码
								</a>
								<a href="/login/exitlogin">
									<i class="icon-off"></i> 注销
								</a>
							</li>
						</ul>
					</li>
				</ul>
				<script type="text/javascript">
					$('#udpwd').click(function() {
		      var content = '<div style="padding-left:15px;margin-bottom:5px;">原始密码：<input type="password" id="opwd"></div>'+
												'<div style="padding-left:15px;margin-bottom:5px;">&nbsp;&nbsp;&nbsp;&nbsp;新密码：<input type="password" id="npwd"></div>'+
												'<div style="padding-left:15px;margin-bottom:5px;">再次输入：<input type="password" id="rnpwd"></div>'+
												'<div style="padding-left:15px;margin-bottom:5px;"><span id="warming"></span></div>'+
		                    '<div class="dialog-button"><button style="margin-left:126px;margin-top:10px;" class="btn btn-sm btn-primary" id="btnuppwd" value="<?php echo $this->session->userdata('username'); ?>">确定</button></div>';
		      deletedialog = dialog({
		        title:'温馨提示',
		        content: content,
		        width:'300px',
		        skin:'  dialog-box',
		        lock:true,
		        padding:'10px'
		      }).showModal();
					});
					$('body').on('click', '#btnuppwd', function() {
						if($('#npwd').val()!=$('#rnpwd').val()){
							alert('两次输入的密码不一致');
							return false;
						}
						$.post('/home/updatepwd', {uid:$(this).val(),opwd: $('#opwd').val(),npwd: $('#npwd').val()}, function(data) {
							if(data!='false'){
								alert('修改成功');
							}else{
								alert('修改失败');
							}
						});
					});
				</script>
				<!-- /.ace-nav -->
			</div>
			<!-- /.navbar-header -->
		</div>
		<!-- /.container -->
	</div>

	<div class="main-container" id="main-container">
		<script type="text/javascript">
			try {
				ace.settings.check('main-container', 'fixed')
			} catch (e) {}
		</script>

		<div class="main-container-inner">
